package com.inexas.cu.client.mvp;

import java.util.*;
import com.google.gwt.validation.client.interfaces.*;

public interface PropertyList<T> extends Member, IValidatable {
	// !todo Consider hiding the source and embedding it in a Viewable pattern 

	boolean add(Source source, T element);

	void add(Source source, int index, T element);

	boolean addAll(Source source, Collection<T> collection);

	boolean addAll(Source source, int index, Collection<T> collection);

	void clear(Source source);

	boolean remove(Source source, T element);

	T remove(Source source, int index);

	boolean removeAll(Source source, Collection<T> collection);

	boolean retainAll(Source source, Collection<T> collection);

	boolean contains(T element);

	boolean containsAll(Collection<T> collection);

	T get(int index);

	int indexOf(T element);

	boolean isEmpty();

	Iterator<T> iterator();

	int lastIndexOf(T element);

	ListIterator<T> listIterator();

	ListIterator<T> listIterator(int index);

	T set(int index, T element);

	int size();

	// Not suported by Google List<T> subList(int fromIndex, int toIndex);

	T[] toArray();

}